Data recording device

ABSTRACT

A digital camera ( 10 ) includes a CPU ( 46 ). When a power source is turned on, the CPU ( 46 ) determines an available area of a recording destination on the basis of an FAT recorded on a magneto-optical disk ( 44 ). Compressed image data created on the basis of an operation of a shutter button ( 48 ) is recorded on the determined available area. When succeeding in recording, the FAT is renewed. When failing in recording due to a defect of the magneto-optical disk ( 44 ), a message is displayed on a monitor ( 28 ). When a set key ( 50 ) is operated after displaying the message, a write protection is set on the magneto-optical disk ( 44 ).

TECHNICAL FIELD

[0001] The present invention relates to a data recording apparatus. Morespecifically, the present invention relates to a data recordingapparatus for recording a data signal onto a recording medium having aplurality of available areas, and renewing position information of theavailable areas after completion of the recording.

PRIOR ART

[0002] As a method of recording a data signal on a recording medium, anFAT (File Allocation table) system of an MS-DOS format is well known. Inthe FAT system, a recording signal is handled in a cluster unit, andtherefore, even when available areas are dispersively distributed due toa repetition of recording and deleting, as long as a total amount of theavailable areas exceeds a size of the data signal, the data signal canbe recorded without problems.

[0003] However, when there causes a lot of defects on the recordingmedium due to deterioration by the repetition of the recording anddeleting, this causes harm to a recording process of the data signal.That is, even if recording is attempted on an available area having alot of defects, the recording results in failure, and when the recordingfails, FAT is also not renewed, and whereby, recording is attempted onthe same available area again. Accordingly, when a recording erroroccurs once due to the defect of the recording medium, the same erroroccurs every time the recording is attempted. If no measures are takento such the recording medium having the defect, operability is sharplyreduced.

SUMMARY OF THE INVENTION

[0004] Therefore, it is a primary object of the present invention toprovide a novel data recording apparatus.

[0005] Another object of the present invention is to provide a datarecording apparatus capable of improving operability.

[0006] According to the present invention, a data recording apparatuscomprises an attaching means for detachably attaching a recording mediumhaving a plurality of available areas and available area information; adetermining means for determining an available area of a recordingdestination on the basis of the available area information; a recordingmeans for recording a data signal on the available area determined bythe determining means; a renewing means for renewing the available areainformation when succeeding in recording of the data signal; and asetting means for setting the recording medium to a recordingprohibition state when failing in recording of the data signal due to adefect of the recording medium.

[0007] The recording medium has the plurality of available areas andavailable information, and such the recording medium is detachablyattached by the attaching means. The determining means determines theavailable area of the recording destination on the basis of theavailable area information, and the recording means records the datasignal in the determined available area. When succeeding in recording ofthe data signal, the available area information is renewed by therenewing means, and when failing in recording of the data signal due tothe defect of the recording medium, the recording medium is set to therecording prohibition state by the setting means. Therefore, there neveroccurs the same recording error every time recording is performed, andtherefore, it is possible to improve operability.

[0008] Preferably, when failing in recording of the data signal due tothe defect of the recording medium, a predetermined message is output byan output means. The setting means sets the recording prohibition statewhen there is a predetermined input with respect to the predeterminedmessage.

[0009] According to the present invention, a data recording method forrecording a data signal on a recording medium having a plurality ofavailable areas and available area information comprises steps of: (a)determining an available area of a recording destination on the basis ofthe available area information; (b) recording a data signal on theavailable area determined in the step (a); (c) renewing the availablearea information when succeeding in recording of the data signal; and(d) setting the recording medium to a recording prohibition state whenfailing in recording of the data signal due to a defect of the recordingmedium.

[0010] When the available area of the recording destination isdetermined on the basis of the available area information, the datasignal is recorded on the available area. When succeeding in recordingof the data signal, the available area information is renewed. However,when failing in recording of the data signal due to the defect of therecording medium, the recording medium is set to the recordingprohibition state. Therefore, there never occurs the same recordingerror every time recording is performed, and therefore, it is possibleto improve operability.

[0011] Preferably, when failing in recording of the data signal due tothe defect of the recording medium, a predetermined message is output.The setting of the recording prohibition state is performed at a timethere is a predetermined input with respect to the predeterminedmessage.

[0012] The above described objects and other objects, features, aspectsand advantages of the present invention will become more apparent fromthe following detailed description of the present invention when takenin conjunction with the accompanying drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

[0013]FIG. 1 is a block diagram showing one embodiment of the presentinvention;

[0014]FIG. 2 is a flowchart showing a part of an operation of FIG. 1embodiment;

[0015]FIG. 3 is a flowchart showing a part of an operation of FIG. 1embodiment;

[0016]FIG. 4 is a flowchart showing another part of the operation ofFIG. 1 embodiment;

[0017]FIG. 5 is an illustrative view showing one example of adistribution state of available areas formed on a magneto-optical disk;

[0018]FIG. 6 is an illustrative view showing one example of an availablearea list; and

[0019]FIG. 7 is an illustrative view showing one example of a messagedisplayed on a monitor.

BEST MODE FOR PRACTICING THE INVENTION

[0020] Referring to FIG. 1, a digital camera 10 of this embodimentincludes an image sensor 12 on which front surface a color filter (notshown) is attached. An optical image of an object is irradiated on alight-receiving surface of the image sensor 12 through the color filter.

[0021] When a power source is turned on, a CPU 46 starts-up a diskcontroller 34. The disk controller 34 controls a spindle motor 38, anoptical pickup 40 and a recording head 42, and performs aninitialization process such as test-reading, test-lighting and etc.

[0022] The CPU 46 also instructs a timing generator (TG) 14 to perform athin-out reading and applies predetermined processing instructions to asignal processing circuit 20 and a video encoder 26. The TG 14 drivesthe image sensor 12 in a thin-out reading manner and whereby, a lowresolution camera signal (pixel signal) corresponding to the objectimage is output from the image sensor 12. The output camera signal issubjected to a well-known noise removal and a level adjustment in aCDS/AGC circuit 16, and then converted to a digital signal by an A/Dconverter 18.

[0023] The signal processing circuit 20 performs processes such as colorseparation, white balance adjustment, YUV conversion and etc., andoutputs YUV data thus generated to a memory control circuit 22 togetherwith a writing request. The YUV data is written to an SDRAM 24 by thememory control circuit 22.

[0024] The video encoder 26 requests the memory control circuit 22 toread the YUV data in response to the processing instruction from the CPU46 and converts the YUV data read by the memory control circuit 22 intoa composite image signal. The converted composite image signal isapplied to a monitor 28 through a switch SW1 and whereby, a real timemotion image (through image) of the object is displayed on the monitor28.

[0025] It is noted that the switch SW1 is connected to a charactergenerator 32 at a predetermined timing when a character signal is outputfrom the character generator 32. The character signal is mixed with thecomposite image signal by the switch SW1 and whereby, a charactercorresponding thereto is displayed on the monitor 28 in an OSD manner.

[0026] When a shutter button 48 is operated after a magneto-optical disk44 is shifted to a recordable state, the CPU 46 instructs the TG 14 tophotograph the object and read one screen of camera signal obtained byphotoelectric conversion (all pixels reading). Thus, a high resolutioncamera signal corresponding to a still image at a time the shutterbutton 46 is operated is output from the image sensor 12. The outputcamera signal is subjected to the same process as the above description,and a high resolution YUV data is retained in the SDRAM 24.

[0027] The CPU 46 suceedingly applies a compression instruction to aJPEG codec 30. The JPEG codec 30 requests the memory control circuit 22to read the YUV data in response to the compression instruction. When arequest of reading is made, the memory control circuit 22 reads oneframe of the high resolution YUV data, i.e., one screen of still imagedata retained in the SDRAM 24. The read still image data is applied tothe JPEG codec 30 so as to be subjected to JPEG compression. Whencompressed image data is generated by the JPEG compression, the JPEGcodec 30 applies to the memory control circuit 22 the compressed imagedata together with a writing request. Therefore, the compressed imagedata is also stored in the SDRAM 24 by the memory control circuit 22.

[0028] The CPU 46 then reads the compressed image data from the SDRAM 24and applies to the disk controller 34 the read compressed image datatogether with a recording instruction. The disk controller 34 drives theoptical pickup 40 and the recording head 42 so as to record thecompressed image data on the magneto-optical disk 44. After completionof the recording process, the CPU 46 performs a through image displayprocess again, and whereby, the through image is displayed on themonitor 28. It is noted that the magneto-optical disk 44 is a detachabledisk recording medium and held by a slot 36 and the spindle motor 38 ata time of attachment.

[0029] The CPU 46 performs a photographing process according to aflowchart shown in FIG. 2 to FIG. 4 after the magneto-optical disk 44has shifted to a recordable state. The CPU 46 first creates an availablearea list 46 a in which available areas of the magneto-optical disk 44are listed and determines an available area to be recorded at first in astep S1. Specifically described, the CPU 46 applies a detectinginstruction of available capacity information to the disk controller 34,and the disk controller 34 creates the available area list 46 a shown inFIG. 6 on the basis of the available capacity information (head addressand size of each of available areas) detected with reference to an FATrecorded on the magneto-optical disk 44. The CPU 46 further identifiesan available area having the smallest size as a recording destinationavailable area.

[0030] The available area list 46 a shown in FIG. 6 corresponds toavailable areas {circle over (1)} to {circle over (4)} diagonally shadedin FIG. 5. According to FIG. 6, the available area {circle over (1)}having a size of “32” is formed on an address “3” and the subsequent,and the available area {circle over (2)} having a size of “245” isformed on an address “71” and the subsequent. Furthermore, the availablearea {circle over (3)} having a size of “268” is formed on an address“96” and the subsequent, and the available area {circle over (4)} havinga size of “503” is formed on an address “48” and the subsequent.

[0031] Returning to FIG. 2, the CPU 46 determines whether or not themagneto-optical disk 44 is under a write protection in a step S3. Morespecifically, the CPU 46 applies an identifying instruction of aprotection state to the disk controller 34 and determines whether or notthe write protection is present on the basis of an identification resultsent back from the disk controller 34. If under the write protection,the CPU 46 sets a flag 46 b in a step S5, and if out of the writeprotection, the CPU 46 resets the flag 46 b in a step S7.

[0032] After completion of setting or resetting the flag 46 b, the CPU46 proceeds to a step S9 so as to perform a through image displayprocess. That is, the CPU 46 applies a thin-out reading instruction tothe TG 14 and applies the predetermined processing instructions to thesignal processing circuit 20 and the video encoder 26. Thus, a throughimage is displayed on the monitor 28. When the shutter button 48 isdepressed by an operator, the CPU 46 determines “YES” in a step S11 andidentifies a state of the flag 46 b in a step S13. If the flag 46 b isreset, the CPU 46 performs processes in a step S15 and the subsequent.If the Flag 46 b is set, the CPU 46 returns to the step S11. That is, ifthe magneto-optical disk 44 is under the write protection, the operationof the shutter button 48 is invalidated.

[0033] If the process proceeds to a step S15, the CPU 46 performs acapturing process of one frame of an object image. More specifically,the CPU 46 applies the all pixels reading instruction to the TG 14 andapplies the compression instruction to a JPEG codec 30 at a timing thatone frame of high resolution YUV data is written to the SDRAM 24. TheJPEG codec 30 performs the JPEG compression to the high resolution YUVdata, and compressed image data is stored in the SDRAM 24.

[0034] The CPU 46 succeedingly determines a reading address of the SDRAM24 and a recording address of the magneto-optical disk 44 in a step S17.The reading address is a head address of the compressed image data, andthe recording address is a head address of the available area determinedin the step S1 (or step S35 described later). In a step S19, the CPU 46reads one sector of the compressed image data from the determinedreading address and the subsequent, and applies the read compressedimage data to the disk controller 34 together with a recordinginstruction. The recording instruction includes the recording addressdetermined in the step S17 (or a step S25 described later). The diskcontroller 34 records on the magneto-optical disk 44 one sector of thecompressed image data applied together with the recording instructionaccording to the recording address included in the recordinginstruction, and after the recording, sends an identifier “OK” back tothe CPU 46.

[0035] When “OK” is sent back from the disk controller 34, the CPU 46determines “YES” in a step S21 and determines whether or not therecording of the one frame of the compressed image data is completed ina step S23. If the recording is not completed, the CPU 46 proceeds to astep S25 and renews the reading address of the SDRAM 24 and therecording address of the magneto-optical disk 44 by predetermined bytes.After completion of the renewal, the CPU 46 returns to the step S19.Therefore, one frame of the compressed image data is recorded on themagneto-optical disk 44 at every sector.

[0036] After completion of recording the one frame of the compressedimage data, the CPU 46 proceeds from the step S23 to a step S27 so as toapply a confirmation instruction for confirming appropriate recording ofthe compressed image data to the disk controller 34. A repetition ofrecording/reproducing over the long term deteriorates quality of themagneto-optical disk 44 and causes a lot of defects on a recordingsurface. Data recorded on a sector having such a defect cannot bereproduced properly. This is the reason why the confirmation instructionis output at a time of completion of recording the compressed imagedata, and it is determined whether recording is made on the sectorhaving the defect or not.

[0037] The disk controller 34 reproduces the compressed image data whichhas been recorded this time at every sector and determines whether ornot the compressed image data (ECC encode signal) of each sector isproperly decoded. When the decoding is properly performed on all thesectors, an identifier indicative of “OK” is sent back from the diskcontroller 34 to the CPU 46. On the one hand, if the decoding is notproperly performed in one part of sectors, a transfer request is sentback from the disk controller 34 to the CPU 46 in order to recode thecompressed image data to be recorded on the sector on anotheralternative area. On the other hand, when the alternative area is fulldue to the large amount of defects, the disk controller 34 determines afurther recording being impossible and sends back the identifierindicative of “ILMEDIA” to the CPU 46.

[0038] When “OK” is sent back form the disk controller 34, the CPU 46determines “YES” in a step S29 and outputs an FAT renewal instruction tothe disk controller 34 in a step S31. The disk controller 34 renews theFAT recorded on the magneto-optical disk 36 in response to the renewalinstruction and sends back “OK” at a time of completing the renewal.When “OK” is sent back due to the renewal of the FAT, the CPU 46determines “YES” in a step S33, and performs a renewal of the availablearea list 46 a and determination of an available area for the nextrecording in a step S35. After completion of the process in the stepS35, the CPU 46 returns to the step S9.

[0039] When a transfer request is sent back from the disk controller 34,the CPU 46 proceeds from a step S49 to a step S51 so as to output therequired compressed image data to the disk controller 34. The transferrequest includes the address data of the sector having defects, and theCPU 46 reads the one sector of the compressed image data from the SDRAM24 on the basis of the address data so as to be output to the diskcontroller 34. The disk controller 34 records the applied compressedimage data to the alternative area, and after completion of therecording, “OK” is sent back to the CPU 46. When “OK” is sent back, theCPU 46 determines “YES” in a step S53 and returns to the step S29. Thedisk controller 34 determines whether or not the recording is properlyperformed as to the compressed image data recorded on the alternativearea and sends back “OK”, “ILMEDELIA” or a transfer request to the CPU46. Accordingly, the CPU 46 returns to the step S29 when “YES” isdetermined in the step S53 also.

[0040] When “ILMEDIA” is sent back from the disk controller 34, the CPU46 proceeds form a step S37 to a step S39 so as to apply a predeterminedcharacter signal to the monitor 28 by controlling the charactergenerator 32 and the switch SW1. The monitor 28 is displayed with amessage of “WRITING ERROR OCCUR. MAKE DISK READ ONLY?” and a letter of“OK”, and a cursor points out “OK”.

[0041] Herein, when the operator operates a set key 50, the CPU 46determines “YES” in a step S41 and outputs a write protection settinginstruction to the disk controller 34 in a step S43. The disk controllersets a write protection to the magneto-optical disk 44 in response tothe write protection setting instruction. The magneto-optical disk 44 isshifted to a recording prohibition state, i.e., is read only (reproducedonly). After completion of setting the write protection, the diskcontroller 34 sends back “OK” to the CPU46. The CPU 46 determines “YES”in a step S45 when “OK” is sent back, and sets the flag 46 b in a stepS47 and then, the process returns to the step S9.

[0042] As can be understood from the above description, the availablearea list 46 a is created on the basis of the FAT recorded on themagneto-optical disk 44, and the recording destination available area isdetermined. The compressed image data created on the basis of theoperation of the shutter button 48 is recorded on the determinedavailable area, and when succeeding in recording, the FAT is renewed.However, when failing in recording due to the defect of themagneto-optical disk 44, a message is displayed on the monitor 28, andthe write protection is set on the magneto-optical disk 44 in responseto the operation of the set key 50.

[0043] The FAT is renewed after one frame of the compressed mage data isrecorded. In other words, when failing in recording, the FAT is neverrenewed, and if no process is performed at a time of the failure,recording is performed on the same available area again. Consequently,when a recording error occurs due to the defect of the magneto-opticaldisk 44, the same recording error occurs repeatedly every time recordingis attempted. In this embodiment, when the recording error occurs due tothe defect of the magneto-optical disk 44, the write protection is seton the magneto-optical disk 44, and therefore, no recording error occursevery time the recording is attempted. Thus, operability can beimproved.

[0044] It is noted that the FAT system is adopted as a recording systemof the compressed image data in this embodiment, a UDF (Universal DiscFormat) system may be adopted alternatively.

[0045] Although the present invention has been described and illustratedin detail, it is clearly understood that the same is by way ofillustration and example only and is not to be taken by way oflimitation, the spirit and scope of the present invention being limitedonly by the terms of the appended claims.

What is claimed is:
 1. A data recording apparatus, comprising: anattaching means for detachably attaching a recording medium having aplurality of available areas and available area information; adetermining means for determining an available area of a recordingdestination on the basis of said available area information; a recordingmeans for recording a data signal on the available area determined bysaid determining means; a renewing means for renewing said availablearea information when succeeding in recording of said data signal; and asetting means for setting said recording medium to a recordingprohibition state when failing in recording of said data signal due to adefect of said recording medium.
 2. A data recording apparatus accordingto claim 1, further comprising an output means for outputting apredetermined message when failing in recording of said data signal dueto the defect of said recording medium, wherein said setting meansperforms setting of said recording prohibition state when there is apredetermined input with respect to said predetermined message.
 3. Adata recording apparatus according to claim 1 or 2, wherein saidrecording medium is a magneto-optical disk.
 4. A data recording methodfor recording a data signal on a recording medium having a plurality ofavailable areas and available area information, comprising steps of: (a)determining an available area of a recording destination on the basis ofsaid available area information; (b) recording a data signal on theavailable area determined in said step (a); (c) renewing said availablearea information when succeeding in recording of said data signal; and(d) setting said recording medium to a recording prohibition state whenfailing in recording of said data signal due to a defect of saidrecording medium.
 5. A data recording method according to claim 4,further comprising steps of (e) outputting a predetermined message whenfailing in recording of said data signal due to the defect of saidrecording medium, wherein a setting of said recording prohibition statein said step (d) is performed when there is a predetermined input withrespect to said predetermined message.